<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>在线考试系统</title>
    <link rel="shortcut icon" th:href="@{/static/favicon.ico}" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <!--[if lt IE 8]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <link rel="stylesheet" type="text/css" th:href="@{/static/css/style.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/static/css/jquery-ui.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/static/css/ui.css}" />
    <link rel="stylesheet" th:href="@{/static/js/skin/layer.css}"/>
    <link th:href="@{/static/css/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/static/css/font-awesome.min.css}" rel="stylesheet">
    <link th:href="@{/static/css/bootstrap-table.css}" rel="stylesheet">
    <style>
        .tm_a{
            font-size: 9pt;
            font-weight: bold;
            cursor: pointer;
            text-decoration: underline;
        }
    </style>
</head>
<body class="gray-bg white">
<div class="form-inline" role="form">
    <div class="tm_main">
        <div class="tm_container">
            <ul class="tm_breadcrumb">
                <li><a th:href="@{/common/welcome}">首页</a> <span class="divider">&gt;</span></li>
                <li class="active">进行中的考试</li>
            </ul>
        </div>
    </div>
</div>
<div id="toolbar">
</div>
<table id="table" data-toolbar="#toolbar"  data-show-toggle="true" data-show-columns="true" data-show-refresh="true" data-query-params="queryParams">
</table>
<script th:src="@{/static/js/jquery-3.3.1.min.js}" type="text/javascript" charset="utf-8"></script>
<script th:src="@{/static/js/bootstrap.min.js}" type="text/javascript" charset="utf-8"></script>
<script th:src="@{/static/js/bootstrap-table.min.js}" type="text/javascript" charset="utf-8"></script>
<script th:src="@{/static/js/bootstrap-table-editable.min.js}" type="text/javascript" charset="utf-8"></script>
<script th:src="@{/static/js/bootstrap-table-zh-CN.min.js}" type="text/javascript" charset="utf-8"></script>
<script th:src="@{/static/js/layer/layer.js}" type="text/javascript" charset="utf-8"></script>
<script th:src="@{/static/js/bootstrap-editable.min.js}" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
    var tm = {
        startExam : function(obj, paperId,uuid){
            window.open('../paper/'+paperId+"/"+uuid+".html");
        },
    };
</script>
<script type="text/javascript" th:inline="javascript">
    var table = $('#table');
    table.bootstrapTable({
        contentType: "application/x-www-form-urlencoded",
        method:'get',
        url: '../index/json' ,
        pagination: false,//是否开启分页（*）
        columns: [
            {
                title: '序号',
                align: 'center',
                formatter: function(value, row, index){
                    return [index+1].join('');
                }
            },{
                field: 'paperName',
                title: '试卷名称',
                align: 'center',
                sortable:true,
            }, {
                title: '时间设定',
                align: 'center',
                formatter:function (value,row,index) {
                    return row.startTime+"<br>"+row.endTime;
                }
            }, {
                field: 'paperMinute',
                title: '考试时长(分钟)',
                align: 'center',
            }, {
                field: 'paperTypeName',
                title: '试卷类型',
                align: 'center',
            }, {
                field: 'totalScore',
                title: '卷面总分',
                align: 'center',
            }, {
                field: 'passScore',
                title: '及格分数',
                align: 'center',
            },{
                field: 'option',
                title: '操作',
                align: 'center',
                formatter: function (value,row,index) {
                    return "<a href=\"javascript:void(0)\" class='tm_a' onclick=\"javascript:tm.startExam(this,'"+row.paperId+"','"+row.uuid+"');\">点击参加</a>";
                }
            }],
    });
</script>
</body>
</html>